ymaps.ready(['DeliveryCalculator']).then(function init () { ymaps.modules.require("router.Editor",function(Editor){ymaps.Editor=Editor})//загружаем модуль редактирования маршрута var myMap = new ymaps.Map('map', { center: [37.8647363563232,55.741673208646965], zoom: 10, type: 'yandex#map', controls: ['fullscreenControl','zoomControl','typeSelector','trafficControl'] }), searchStartPoint = new ymaps.control.SearchControl({ options: { useMapBounds: true, noPlacemark: true, noPopup: true, placeholderContent: 'Введите адрес', size: 'large' } }), searchFinishPoint = new ymaps.control.SearchControl({ options: { useMapBounds: true, noCentering: true, noPopup: true, noPlacemark: true, placeholderContent: 'Введите адрес', size: 'large', float: 'none', position: { left: 10, top: 44 } } }), addPoint = new ymaps.control.Button({ data: { content: "Точка", image:"http://xn-----6kcjbbpem8ahp0a6b3k.xn--p1ai/images/plus.png", title:"Добавить точку" } }); calculator = new ymaps.DeliveryCalculator(myMap); $("#isDayCheck,#traffic_input").change(function(){calculator._setupRoute()}); myMap.events.add('click', function (e) { //$('#car [value="0"]').attr('selected','selected'); //$('#gr [value="1"]').attr('selected','selected'); console.log('clicked'); //$("#car option[value='0']").prop("selected", true); //$("#gr option[value='1']").prop("selected", true); $('#price').html('0'); //$('#git').html('0'); }); myMap.controls.add(searchStartPoint); myMap.controls.add(searchFinishPoint); myMap.controls.add(addPoint); var removePoint = new ymaps.control.Button({ data: { content: "Точка", image:"http://xn-----6kcjbbpem8ahp0a6b3k.xn--p1ai/images/minus.png", title:"Удалить точку" } }); myMap.controls.add(removePoint); removePoint.events.add("click",function(){ for(i=0;i